Skip to content

fix(place): update PhoneInput onInput handler to mutate place phone - #278

Merged
roncodes merged 1 commit into
fleetbase:dev-v0.6.59from
spanchenko:fix/place-phone-country-code
Aug 2, 2026
Merged

fix(place): update PhoneInput onInput handler to mutate place phone#278
roncodes merged 1 commit into
fleetbase:dev-v0.6.59from
spanchenko:fix/place-phone-country-code

Conversation

@spanchenko

Copy link
Copy Markdown

PR Description:

Summary

Fixes an issue where saving or updating a Place entity stored phone numbers without the international country dial code (E.164 format).

Cause of the Issue

In `addon/components/place/form.hbs`, the `<PhoneInput />` component was configured with `@onInput={{this.phone}}`. However,

this.phone is not defined in PlaceFormComponent, resolving @onInput to undefined.

Because `@onInput` was `undefined`, `PhoneInput`'s `intl-tel-input` event handler was never triggered to format the number with

the country dial code prefix, causing only raw input text to be saved instead of the formatted E.164 phone string.

Solution

Replaced `@onInput={{this.phone}}` with `@onInput={{fn (mut @resource.phone)}}`. This aligns `Place` form behavior with all other

forms across the codebase (such as contact/form.hbs, driver/form.hbs, customer/form.hbs, and vendor/form.hbs), ensuring
phone numbers are correctly mutated and stored in standard E.164 format (e.g. +1..., +7...).

Changes

- **`addon/components/place/form.hbs`**: Updated `<PhoneInput />` `@onInput` action to `{{fn (mut @resource.phone)}}`.

@roncodes
roncodes changed the base branch from main to dev-v0.6.59 August 2, 2026 06:06
@roncodes
roncodes merged commit 5a8646c into fleetbase:dev-v0.6.59 Aug 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants